<%-- 
  -- Body List para AcademicRecord.
  --
  -- @author ariel.piechotka
--%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/displaytag-el.tld" prefix="display" %>
<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%-- Librerias para EXT library --%>
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/ext-1.1.1/resources/css/ext-all.css'/>" />
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/ext-1.1.1/resources/css/xtheme-default.css'/>" />

<script src="<html:rewrite page='/protected/script/ext-1.1.1/adapter/ext/ext-base.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ext-1.1.1/ext-all.js'/>" type="text/javascript"></script>

<script type="text/javascript">
    function showAcademicRecord(academicRecordId) {
        var hiddenAcademicRecordId = $("academicRecordShowId");
        hiddenAcademicRecordId.value = academicRecordId;        
        var form = $("showAcademicRecordFormId");
        form.submit();
    }
</script>


<%-- El ID del form NO debe ser modificado. Se usa desde el menu --%>
<html:form action="/protected/listAcademicRecords.do" styleId="subjectFormId">
    
    <h2>Actas</h2>

    <bean:define id="academicRecords" name="academicRecordForm" property="academicRecords" />
    <display:table name="pageScope.academicRecords" sort="list" export="true" pagesize="15" requestURI="/protected/listAcademicRecords.do" id="row" class="displayTable">

        <display:column title="Ver" class="columnGifLink" media="html">
            <img src="<html:rewrite page='/protected/img/user.png'/>" alt="" name="submit" onclick="showAcademicRecord('<bean:write name="row" property="id" />')" title="Muestra el acta seleccionada ...">
        </display:column>

        <display:column title="Fecha" property="formattedDate" sortable="true" />
        <display:column title="Docente" property="teacher.name" sortable="true" />
    </display:table>    

</html:form>

<%-- Inyectados por Javascript --%>
<div id="modifyDivId" class="hideClass">
    <html:form action="/protected/showAcademicRecord" styleId="showAcademicRecordFormId">
        <html:hidden property="id" value="" styleId="academicRecordShowId" />
    </html:form>
</div>
